/*  1:   */ package org.intellij.plugins.relaxNG.convert;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.ui.components.JBTabbedPane;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.util.Map;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */ 
/* 11:   */ public class AdvancedOptionsDialog
/* 12:   */   extends DialogWrapper
/* 13:   */ {
/* 14:   */   private AdvancedOptions a;
/* 15:   */   private AdvancedOptions b;
/* 16:   */   private Map<String, ?> c;
/* 17:   */   private Map<String, ?> d;
/* 18:   */   
/* 19:   */   protected AdvancedOptionsDialog(Project paramProject, SchemaType paramSchemaType1, SchemaType paramSchemaType2)
/* 20:   */   {
/* 21:40 */     super(paramProject, false);
/* 22:41 */     setTitle("Advanced Conversion Options");
/* 23:43 */     if (paramSchemaType1 == SchemaType.DTD) {
/* 24:44 */       this.a = new AdvancedDtdOptions();
/* 25:   */     }
/* 26:46 */     if (paramSchemaType2 == SchemaType.XSD) {
/* 27:47 */       this.b = new AdvancedXsdOptions();
/* 28:   */     }
/* 29:50 */     init();
/* 30:   */   }
/* 31:   */   
/* 32:   */   @Nullable
/* 33:   */   protected JComponent createCenterPanel()
/* 34:   */   {
/* 35:   */     Object localObject;
/* 36:56 */     if ((this.a != null) && (this.b != null))
/* 37:   */     {
/* 38:57 */       localObject = new JBTabbedPane();
/* 39:58 */       ((JTabbedPane)localObject).addTab("Input", this.a.getRoot());
/* 40:59 */       ((JTabbedPane)localObject).addTab("Output", this.b.getRoot());
/* 41:   */     }
/* 42:60 */     else if (this.a != null)
/* 43:   */     {
/* 44:61 */       localObject = this.a.getRoot();
/* 45:   */     }
/* 46:   */     else
/* 47:   */     {
/* 48:63 */       localObject = this.b.getRoot();
/* 49:   */     }
/* 50:65 */     return localObject;
/* 51:   */   }
/* 52:   */   
/* 53:   */   public Map<String, ?> getInputOptions()
/* 54:   */   {
/* 55:69 */     if (this.a != null) {
/* 56:70 */       return this.a.getOptions();
/* 57:   */     }
/* 58:72 */     return this.c;
/* 59:   */   }
/* 60:   */   
/* 61:   */   public Map<String, ?> getOutputOptions()
/* 62:   */   {
/* 63:77 */     if (this.b != null) {
/* 64:78 */       return this.b.getOptions();
/* 65:   */     }
/* 66:80 */     return this.d;
/* 67:   */   }
/* 68:   */   
/* 69:   */   public void setOptions(Map<String, ?> paramMap1, Map<String, ?> paramMap2)
/* 70:   */   {
/* 71:85 */     if (this.a != null) {
/* 72:86 */       this.a.setOptions(paramMap1);
/* 73:   */     } else {
/* 74:88 */       this.c = paramMap1;
/* 75:   */     }
/* 76:90 */     if (this.b != null) {
/* 77:91 */       this.b.setOptions(paramMap2);
/* 78:   */     } else {
/* 79:93 */       this.d = paramMap2;
/* 80:   */     }
/* 81:   */   }
/* 82:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.plugins.relaxNG.convert.AdvancedOptionsDialog

 * JD-Core Version:    0.7.0.1

 */